<%@page import="java.util.Date"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Edit Supporting Material</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="author" content="TienNM">

<link href="resources/css/bootstrap.min.css"
	rel="stylesheet">
<script type="text/javascript"
	src="resources/js/jquery.min.js"></script>
<script type="text/javascript"
	src="resources/js/bootstrap.min.js"></script>

<style type="text/css">
    body{
    	padding-top: 70px;
    }
</style>
</head>
<body>
<%@ include file="header.jsp" %>
	<div class="container">
		<h2>Edit Supporting Material</h2>
		<hr>
		<div class="tabbable">
			<ul class="nav nav-tabs">
				<li class="active"><a href="#panel-infoSuppMaterial" data-toggle="tab">Details</a></li>
			</ul>
			<div class="tab-content">
				<div class="tab-pane active" id="panel-infoSuppMaterial">
					<form:form class="form-horizontal" role="form" action="editSupportingMaterial"
						method="post" commandName="suppMaterial">
						<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
							<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
								<p></p>
								<div class="form-group">
									<label for="suppURL" class="col-lg-4 control-label">URL:<span style="color: red;">*</span></label>
									<div class="col-lg-6">
										<form:hidden path="supportingMaterialID" /> 
										<form:hidden path="user.userID" /> 
										<form:hidden path="organisation.orgID" />
										<form:input path="URL" class="form-control" id="suppURL" />
									</div>
								</div>

								<div class="form-group">
									<label for="suppDesc" class="col-lg-4 control-label">Description:</label>
									<div class="col-lg-6">
										<form:textarea path="description" class="form-control " id="suppDesc" />
									</div>
								</div>

								<div class="form-group">
									<label for="suppType" class="col-lg-4 control-label">Type:</label>
									<div class="col-lg-4">
										<form:select path="type" items="${listType }"
											class="form-control" id="suppType" />
									</div>
								</div>
							</div>
							<div class="col-xs-6 col-sm-6 col-md-6 col-lg-6">
								<p></p>

								<div class="form-group">
									<label for="suppAddedBy" class="col-lg-4 control-label">Added by:</label>
									<div class="col-lg-6">
										<input disabled value="${suppMaterial.user.account }" class="form-control"
											id="suppAddedBy"/>
									</div>
								</div>
								<div class="form-group">
									<label for="suppAddedDate" class="col-lg-4 control-label">Added
										Date:</label>
									<div class="col-lg-6">
										<form:input readonly="true" path="addedDate" class="form-control" id="suppAddedDate"/>
										
									</div>
								</div>
								<div class="form-group">
									<label for="suppIsActive" class="col-lg-4 control-label">Active</label>
									<div class="col-lg-6">
										<form:checkbox path="active" value="${active }"/>
									</div>
								</div>
							</div>
						</div>
						<div class="row">
							<div class="col-md-2 col-md-offset-5">
								<input type="submit" value="Save"class="btn btn-success btn-default">
								<input type="button" value="Back"
									onclick="location.href='orgDetail?orgId=${suppMaterial.organisation.orgID}';"
									class="btn btn-danger btn-default">
							</div>
						</div>
					</form:form>
				</div>
			</div>
		</div>
	</div>
<%@ include file="footer.jsp" %>
</body>
</html>